package cn.csust.net2.manager.shared.service;
import java.util.List;

import cn.csust.net2.manager.shared.exception.BeyondAuthorityException;
import cn.csust.net2.manager.shared.po.PO;

import com.extjs.gxt.ui.client.data.BaseListLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.google.gwt.user.client.rpc.RemoteService;
/**
 * 所有的异常应该在本层中处理掉，包括HIBERNATE中的非显示的异常
 * 业务逻辑的接口定义在客户端
 * 
 * 
 * 
 * @author 韩忠金
 *
 * @param <T>
 */
public interface BaseService extends  RemoteService{
	/**
	 * 查询条件：学号
	 */
	public static final String STUDENT_NUMBER = "studentNumber";
	public static final String START_TIME = "startTime";
	public static final String END_TIME = "endTime";
	public static final String STUDENT_NUMBERL_LIST = "studentNumberList";
	public  void save(PO t) throws BeyondAuthorityException;
	public  void delete(PO t)throws BeyondAuthorityException;
	public  void update(PO t)throws BeyondAuthorityException;
	public void save(List<PO> list)throws BeyondAuthorityException;
	public void delete(List<PO> list)throws BeyondAuthorityException;
	public void update(List<PO> list)throws BeyondAuthorityException;
	public <T extends PO>   PagingLoadResult<T> findAll(String cla,PagingLoadConfig config)throws BeyondAuthorityException;
	public <T extends PO>  PagingLoadResult<T> findAll(String cla,PagingLoadConfig config,String hql)throws BeyondAuthorityException;
	public <T extends PO> List<T> findAll(String cla)throws BeyondAuthorityException;
	public <T extends PO> List<T> findAll(String cla, BaseListLoadConfig config)throws BeyondAuthorityException;
}
